---
title: How to Interact with MindsDB from PHP
sidebarTitle: MindsDB and PHP
---

To get started with MindsDB, you need to either [create an account at MindsDB Cloud](/setup/cloud) or install MindsDB locally via [pip](/setup/self-hosted/pip/source) or [docker](/setup/self-hosted/docker).

There are a few ways you can interact with MindsDB from the PHP code.

1. You can connect to MindsDB using the [PHP Data Objects](https://www.php.net/manual/en/book.pdo.php) and execute statements directly on MindsDB with the `PDO::query` method.

2. You can use the [REST API](/rest/overview) endpoints to interact with MindsDB directly from PHP.
